﻿<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title></title>
    <script type="text/javascript" src="/script/jx.js"></script>
    <script type="text/javascript">
        Jx.using("Jx.util");
        Jx.using("Jx.effect");
        Jx.using("Jx.tmp");

        Jx.ready(function () {

            var data = [
                { name: 1, age: 10 },
                { name: 2, age: 11 },
                { name: 3, age: 12 },
                { name: 4, age: 13 }
            ];

            Jx("#tmpTest1").render("ul", data);
            Jx("#tmpTest2").render("#aa", {name:"aaa",age:12});
        });

    </script>        
</head>
<body>
    <ul></ul>
    <div id="aa">
        
    </div>
    <script type="text/html" id="tmpTest1">
        <li>{name}<span style="padding-left:10px">{age}</span></li>
    </script>
    <script type="text/html" id="tmpTest2">
        <div>{name}</div>
        <div>{age}</div>
    </script>
</body>
</html>
